package com.wzqj.agent.web.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wzqj.agent.web.dao.RoleDao;
import com.wzqj.agent.web.domain.Role;
import com.wzqj.agent.web.service.RoleService;
/**
 * 角色业务实现层
 * @author gz
 *
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleDao roleDao;
	@Override
	public int insert(Role role) {
		roleDao.insert(role);
		return role.getId();
	}

	@Override
	public int delete(Integer id) {
		roleDao.delete(id);
		return id;
	}

	@Override
	public int update(Role role) {
		roleDao.update(role);
		return role.getId();
	}

	@Override
	public Role getById(Integer id) {
		return roleDao.getById(id);
	}

}
